package org.neuedu.vblogserver.controller;


import com.github.pagehelper.PageInfo;
import org.neuedu.vblogserver.bean.RespBean;
import org.neuedu.vblogserver.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserContorller {
    @Autowired
    UserService userService;

    @GetMapping("/getUsers")
    public PageInfo getUsers(String serchKeyWord, @RequestParam(value = "pageNum",defaultValue = "1") int pageNum, @RequestParam(value = "pageSize",defaultValue = "5") int pageSize) {
        return userService.getUsers(serchKeyWord,pageNum,pageSize);
    }

   /* @DeleteMapping("/delUserRole/{uid}/{rid}")
    public RespBean delUserRole(@PathVariable String uid, @PathVariable String rid) {
        return userService.delUserRole(uid,rid);
    }*/


}
